const executeSql = require("../utils/dbUtil");

class UserDao {
    // 查询所有用户
    static async listUsers() {
        const sql = "select * from sys_user";
        const res = await executeSql(sql);
        console.log("UserDao----", res);
        return res;
    }

    static async getUserById(id) {
        const sql = "select * from sys_user where id = ?";
        const res = await executeSql(sql, id);
        console.log("UserDao----", res);
        return res;
    }
}

module.exports = UserDao;